Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull request for issue #856
The
orientation
field contains the "Orientation" tag present in the file (if not present it will default to 1).The
localOrientation
field is used to rotate the thumbnail without writing into the original file (by default is one).Both use the EXIF orientation standard (numbers form 1 to 8) to describe how the image should be rotated.
The app by default rotates the thumbnails using the
localOrientation
field.If the users wants to save the tags to the image, the
orientation
field is used and it is written into the file itself. Most (if not all) image viewers will see that tag and rotate the image accordly. This method is non-destructive on the images as this is a loseless rotation (the image doesn't get re-encoded).The
api/photosedit/rotate
endpoint has been added and it accepts POST requests passing:image_hash
: The hash of the image that needs to be rotatedangle
: A number that is a multiple of 90, that the image will be rotated by. If the number is negative the rotation will be counter-clockwiseflip
: If the image should be filp (can be omitted, the default is false)